package br.com.mooble.activitys;

import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.RadioButton;
import br.com.mooble.R;

import com.googlecode.androidannotations.annotations.AfterViews;
import com.googlecode.androidannotations.annotations.Click;
import com.googlecode.androidannotations.annotations.EActivity;
import com.googlecode.androidannotations.annotations.Fullscreen;
import com.googlecode.androidannotations.annotations.NoTitle;
import com.googlecode.androidannotations.annotations.ViewById;
import com.markupartist.android.widget.ActionBar;
import com.markupartist.android.widget.ActionBar.AbstractAction;


@NoTitle
@Fullscreen
@EActivity(R.layout.mais)
public class Mais extends Activity {
	
	@ViewById
	RadioButton radioHome;
	@ViewById
	RadioButton radioCalendario;
	@ViewById
	RadioButton radioForum;
	@ViewById
	RadioButton radioMais;
	@ViewById
	ActionBar actionBar;


	
	@AfterViews
	void inicializar() {
		configurarActionBar();
		radioMais.setChecked(true);

	}

	private void configurarActionBar() {
		actionBar.setTitle("Mais");
		actionBar.setHomeLogo(R.drawable.ic_mais_barra);
		actionBar.addAction(new AcaoConfigurar());
	}

	public class AcaoConfigurar extends AbstractAction {

		public AcaoConfigurar() {
			super(R.drawable.gear);

		}

		public void performAction(View view) {

		}
	}

	@Click({R.id.radioHome, R.id.radioCalendario,
		R.id.radioForum })
	public void onCheckedChanged(View buttonView) {

			if (buttonView.getId() == R.id.radioHome) {
				Intent iHome = new Intent(Mais.this, Principal_.class);
				Mais.this.startActivity(iHome);
				

			} else if (buttonView.getId() == R.id.radioCalendario) {
				Intent iCalendario = new Intent(Mais.this, Calendario_.class);
				Mais.this.startActivity(iCalendario);
				

			} else if (buttonView.getId() == R.id.radioForum) {
				Intent iForum = new Intent(Mais.this, Forum_.class);
				Mais.this.startActivity(iForum);
				
			}
			Mais.this.overridePendingTransition(
					R.anim.slide_entrando_esquerda, R.anim.slide_saindo_direita);

		}

}